A typical motion system consists of four elements, a motion controller that directs the motion, a motion actuator, a driver unit that controls power applied to the motion actuator, and a feedback device that measures the motion and provides feedback to the controller. Two types of feedback are typically used—incremental and absolute. In a typical motion system, the motion controller provides a signal to the motor driver that causes the motor to turn. As the feedback device, the pulse encoder creates a discrete pulse for every unit of motion that occurs and sends this pulse back to the motion controller. This is referred to as a motion event. The motion controller accumulates these incremental feedback pulses over a period of time to determine the actual position of the device. Further, using the change in position over time, the motion controller can also calculate actual velocity, acceleration and jerk. In classic closed-loop control, the motion controller also calculates the intended position of the device at the end of each fixed period using given values for velocity, acceleration and jerk. The controller then compares the intended position with the actual position to produce an “error” value. An electrical signal is produced based on the “error” and this is sent to the motor driver to provide more or less power to the motor.
Historically, in digital motion control systems, the feedback pulses (motion events) are accumulated over a fixed period of time, because having a fixed motion event accumulation period simplifies the motion control process. A fixed motion period provides a fixed denominator for calculating velocity (i.e. velocity equals change in position divided by the motion period). Similarly, fixed motion periods aid in the calculation of acceleration and jerk. In a digital motion control system, choosing an opportune value for the fixed motion period can create further reductions in the motion calculations. Digital control systems using a microprocessor require a certain amount of time to calculate the resultant “error” value. For this reason, the fixed period of motion accumulation is almost always at least the worst-case time for these calculations.
One problem with accumulating the motion events over a fixed period of time is well known in the trade, and is referred to as “quantization error”. Quantization error occurs because the controller only accumulates discrete events. The controller cannot determine when the next motion event will occur; therefore at the end of any period there is usually some amount of motion that is not accounted for. The position error associated with this small amount of motion is negligible, but the short sampling period magnifies the effect of the unaccounted motion to create larger uncertainties in velocity and acceleration measurements.
The proportional uncertainties are most profound when the velocity of the motion is nearly one event per sample period. For example, if the motion system is accumulating pulses (motion events) over 1 millisecond, the uncertainty is greatest when the velocity is nearly one thousand pulses per second. A motion velocity of 1500 pulses per second will be captured as one pulse per millisecond in one period and two pulses per millisecond in the next. The motion controller can misinterpret these readings to assume the motion velocity is oscillating between 1000 pulses per second and 2000 pulses per second, even though the both the desired and actual velocities are 1500 pulses per second. A similar situation can occur when the motion velocity is less than one pulse per sample period.
The problem of properly recording less than one pulse per sample period is so acute that some higher performance motion systems handle this situation as a special case. When the motion produces less than one incoming pulse per sample period, these systems will measure the time between successive pulses and use this time in the velocity calculation. Instead of measuring the time between motion pulses, some systems with quadrature encoder feedback measure the pulse width of one of the quadrature phases. This has the effect of measuring the time for two successive motion counts and is similar to measuring the time between successive pulses.
Even at motion velocities substantially different than one pulse per sample period, quantization error can substantially compromise the ability of the motion controller to estimate the actual instantaneous velocity. Again, with a one-millisecond sample period, an actual velocity of 9900 pulses per second will be recorded as 9000 pulses per second in some periods and 10000 pulses per second in others.
More frequent sampling of the motion (i.e. shorter sampling periods) does not repair the situation. To illustrate, we can use some of the same motion velocities as above, but calculate the results of reducing the sample period to 200 microseconds. A motion of 1500 pulses per second will be recorded as no motion for two or three sample periods and a single motion equivalent to 5000 pulses per second in the next. A motion velocity of 9000 pulses per second will be recorded as two pulses in most sample periods and one every fifth period. The one pulse per sample period appears to be a velocity of 5000 pulses per second; two pulses in a sample period appears to be a velocity of 10000 pulses per second.
In recent years, the issues resulting from quantization error have become more acute. Feedback encoders have become more precise, creating more pulses for a given distance moved. Motor speeds have increased, creating more pulses per period. Faster automation has led to shorter motion travel times. In addition, many motion systems now require precise velocity and acceleration profiles, not just position, in order to coordinate the motion of multiple axes.